package com.mlf.observer.demo02;

import lombok.Data;

// 包含新旧价格的数据对象
// 封装价格改变事件
@Data
public class PriceChangeEvent {
    private  double oldPrice;
    private  double newPrice;
    
    public PriceChangeEvent(double oldPrice, double newPrice) {
        this.oldPrice = oldPrice;
        this.newPrice = newPrice;
//        System.out.println("oldPrice  " + oldPrice + " to " + newPrice);
    }

}